package com.augurit.common.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * 机构部门Entity类
 * 
 */
@Entity
@Table(name = "OM_ORG")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class OmOrg {

	//属性
	private Long orgId;			//主键ID
	private String orgCode;		//机构编号
	private String orgName;		//机构名称
	private String orgType;		//机构类型
	private Integer orgLevel;	//机构层次
	private String orgGrade;	//机构等级
	private Long parentOrgId;	//父机构ID
	private String orgSeq;		//机构序列
	private String orgAddr;		//机构地址
	private String zipCode;		//邮政编码
	private Long directorPosId;	//机构主管岗位ID
	private Long directorUserId;//机构主管人员ID
	private String linkMan;		//联系人
	private String linkTel;		//联系电话
	private String email;		//电子邮箱
	private String webUrl;		//网站地址
	private String status;		//机构状态。0为注销，1为正常
	private String area;		//所属地域
	private String creator;		//创建人
	private Date createTime;	//创建时间
	private String updator;		//修改人
	private Date updateTime;	//修改时间
	private Integer sortNo;		//排列顺序
	private String isLeaf;		//是否叶子节点。0为非叶子节点，1为叶子节点
	private Integer subCount;	//子节点数
	private String remark;		//备注
	
	
	@Id
    @SequenceGenerator(name="SEQ_OM_ORG", sequenceName="SEQ_OM_ORG", allocationSize=1)
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SEQ_OM_ORG")
	public Long getOrgId() {
		return orgId;
	}

	public void setOrgId(Long orgId) {
		this.orgId = orgId;
	}

	public String getOrgCode() {
		return orgCode;
	}

	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}

	public String getOrgName() {
		return orgName;
	}

	public void setOrgName(String orgName) {
		this.orgName = orgName;
	}

	public String getOrgType() {
		return orgType;
	}

	public void setOrgType(String orgType) {
		this.orgType = orgType;
	}

	public Integer getOrgLevel() {
		return orgLevel;
	}

	public void setOrgLevel(Integer orgLevel) {
		this.orgLevel = orgLevel;
	}

	public String getOrgGrade() {
		return orgGrade;
	}

	public void setOrgGrade(String orgGrade) {
		this.orgGrade = orgGrade;
	}

	public Long getParentOrgId() {
		return parentOrgId;
	}

	public void setParentOrgId(Long parentOrgId) {
		this.parentOrgId = parentOrgId;
	}

	public String getOrgSeq() {
		return orgSeq;
	}

	public void setOrgSeq(String orgSeq) {
		this.orgSeq = orgSeq;
	}

	public String getOrgAddr() {
		return orgAddr;
	}

	public void setOrgAddr(String orgAddr) {
		this.orgAddr = orgAddr;
	}

	public String getZipCode() {
		return zipCode;
	}

	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}

	public Long getDirectorPosId() {
		return directorPosId;
	}

	public void setDirectorPosId(Long directorPosId) {
		this.directorPosId = directorPosId;
	}

	public Long getDirectorUserId() {
		return directorUserId;
	}

	public void setDirectorUserId(Long directorUserId) {
		this.directorUserId = directorUserId;
	}

	public String getLinkMan() {
		return linkMan;
	}

	public void setLinkMan(String linkMan) {
		this.linkMan = linkMan;
	}

	public String getLinkTel() {
		return linkTel;
	}

	public void setLinkTel(String linkTel) {
		this.linkTel = linkTel;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getWebUrl() {
		return webUrl;
	}

	public void setWebUrl(String webUrl) {
		this.webUrl = webUrl;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getUpdator() {
		return updator;
	}

	public void setUpdator(String updator) {
		this.updator = updator;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Integer getSortNo() {
		return sortNo;
	}

	public void setSortNo(Integer sortNo) {
		this.sortNo = sortNo;
	}

	public String getIsLeaf() {
		return isLeaf;
	}

	public void setIsLeaf(String isLeaf) {
		this.isLeaf = isLeaf;
	}

	public Integer getSubCount() {
		return subCount;
	}

	public void setSubCount(Integer subCount) {
		this.subCount = subCount;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}